package com.kaiyiweitong.tongxing.activity.my;

import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.view.View;
import android.widget.RelativeLayout;

import com.kaiyiweitong.tongxing.R;
import com.kaiyiweitong.tongxing.base.BaseActivity;
import com.kaiyiweitong.tongxing.constant.HttpConstant;
import com.kaiyiweitong.tongxing.util.HttpUtil;

import java.util.HashMap;

import butterknife.Bind;
import butterknife.ButterKnife;
import butterknife.OnClick;

/**
 * Created by Administrator on 2017/12/17 0017.
 */

public class HelpCenterActivity extends BaseActivity {
    @Bind(R.id.rl_about_us)
    RelativeLayout mRlAboutUs;
    @Bind(R.id.rl_normal_question)
    RelativeLayout mRlNormalQuestion;
    @Bind(R.id.rl_store_service)
    RelativeLayout mRlStoreService;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_help_center);
        ButterKnife.bind(this);
        initData();
    }

    private void initData() {
        HttpUtil.get(HttpConstant.HELP_CENTER, new HashMap<String, String>(), this, new HttpUtil.MyCallBack() {
            @Override
            public void onResult(String result) {

            }
        });
    }

    @OnClick({R.id.rl_about_us, R.id.rl_normal_question, R.id.rl_store_service})
    public void onViewClicked(View view) {
        switch (view.getId()) {
            case R.id.rl_about_us:
                go2Page(AboutUsActivity.class);
                break;
            case R.id.rl_normal_question:
                go2Page(NormalQuestionActivity.class);
                break;
            case R.id.rl_store_service:
                go2Page(StoreServiceActivity.class);
                break;
        }
    }

    private void go2Page(Class clazz) {
        Intent intent = new Intent(this, clazz);

        startActivity(intent);
    }
}